#ifndef MEASURE_SIZE_TRACKER_DRAW_OBJS_MANAGER_H_
#define MEASURE_SIZE_TRACKER_DRAW_OBJS_MANAGER_H_

#if defined(_MSC_VER)
#pragma once
#endif

#include "draw_obj.h"
#include <boost/ptr_container/ptr_vector.hpp>

class draw_objs_manager
{
public:
  draw_objs_manager(void);
  ~draw_objs_manager(void);

public:
  int num_selections(void) const { return selections.size(); }
  int num_normals(void) const { return normals.size(); }
  int num_hides(void) const { return hides.size(); }
  draw_obj* find_selected(const tstring& objName, int ownerElement);
  draw_obj* find_normal(const tstring& objName, int ownerElement);

public:
  draw_obj* obj_at(const point_2 &point);
  bool obj_selected(const draw_obj *obj) const;
  void select(draw_obj *obj, bool addobj);
  void deselect(draw_obj *obj);
  void select_within_box(const box_2& box, bool addobj);
  void clone(const draw_obj *obj) {}
  void draw(int wndid) const;
  void erase(const draw_obj *obj);

public:
  boost::ptr_vector<draw_obj> selections;
  boost::ptr_vector<draw_obj> normals;
  boost::ptr_vector<draw_obj> hides;
};

#endif // MEASURE_SIZE_TRACKER_DRAW_OBJS_MANAGER_H_